﻿#define _CRT_SECURE_NO_WARNINGS 1

//编程初学者入门训练第二十一题
//BC23 时间转换
//https://www.nowcoder.com/practice/c4ae7bcac7f9491b8be82ee516a94899?tpId=107&tqId=33304&rp=1&ru=/exam/oj/ta&qru=/exam/oj/ta&sourceUrl=%2Fexam%2Foj%2Fta%3FtpId%3D107&difficulty=undefined&judgeStatus=undefined&tags=&title=

#include <stdio.h>

int main() {
    int number = 0;
    int hour = 0;
    int minute = 0;
    scanf("%d", &number);

    while (number >= 3600) {
        number -= 3600;
        hour++;
    }

    while (number >= 60) {
        number -= 60;
        minute++;
    }

    printf("%d %d %d", hour, minute, number);

    return 0;
}